﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ray2010
{
    public class Node
    {
        long x;
        long y;
        List<Node> connectedNodes;
        bool required;
        int absolutePosition;

        public Node(long x, long y, bool required)
        {
            this.x = x;
            this.y = y;
            this.required = required;
            connectedNodes = new List<Node>();
            
        }

        public Node(long x, long y, bool required, int absolutePosition)
        {
            this.x = x;
            this.y = y;
            this.required = required;
            connectedNodes = new List<Node>();
            this.absolutePosition = absolutePosition;
        }
        public void AddConnectedNode(Node node)
        {
            this.connectedNodes.Add(node);
        }

        public List<Node> GetConnectedNotes()
        {
            return connectedNodes;
        }

        public int GetAbsolutePosition()
        {
            return absolutePosition;
        }

        public void SetAbsolutePosition(int absolutePosition)
        {
            this.absolutePosition = absolutePosition;
        }
            
        public long GetX()
        {
            return x;
        }

        public long GetY()
        {
            return y;
        }

        public bool IsRequired()
        {
            return required;
        }

    }
}
